using System;
using System.Collections.Generic;
using Dict.DataModel;

namespace Dict.Dao
{
    public class TableStoryDialogHeroDao:DaoBase<TableStoryDialogHero>
    {
        public override void AddPrimaryIndex(TableStoryDialogHero model)
        {
            cachePrimary[model.id.ToString()] = model;
        }

        public override string GetFileName()
        {
            return "TableStoryDialogHero.txt";
        }

        protected override TableStoryDialogHero ParseRowData(string[] rowData)
        {
            TableStoryDialogHero data = new TableStoryDialogHero();
			data.id = rowData [0];
			data.bodyAtlas = rowData [1];
			data.faceAtlas = rowData [2];

            if (string.IsNullOrEmpty(rowData[3]))
            {
                data.scale = 0;
            }
            else
            {
                data.scale = double.Parse(rowData[3]);
            }

            return data;
        }



    }

}
